﻿using Fine.TestUtils;
using NUnit.Framework;



namespace Fine.Collections.Intf
{
    [TestFixture]
    public class SearchResult_test
    {

        [Test]
        public void Test_ItemFound()
        {
            var result = SearchResults<long>.Found(3336L);
            result.Found  ._true_();
            result.Item   ._equals_(3336L);
        }


        [Test]
        public void Test_NotFound()
        {
            var result = SearchResults<long>.NotFound();
            result.Found  ._false_();
            result.Item   ._equals_(0L);
        }


        [Test]
        public void Test_ToString_Found()
        {
            var result = SearchResults<long>.Found(3336L);
            result.ToString()  ._equals_("3336");
        }


        [Test]
        public void Test_ToString_Found_Null()
        {
            var result = SearchResults<object>.Found(null);
            result.ToString()  ._equals_("");
        }


        [Test]
        public void Test_ToString_NotFound_Value()
        {
            var result = SearchResults<long>.NotFound();
            result.ToString()  ._equals_("");
        }


        [Test]
        public void Test_ToString_NotFound_Null()
        {
            var result = SearchResults<object>.NotFound();
            result.ToString()  ._equals_("");
        }


        [Test]
        public void Test_GetHashCode_Found()
        {
            var result = SearchResults<long>.Found(3336L);
            result.GetHashCode()  ._equals_(3336L.GetHashCode());
        }


        [Test]
        public void Test_GetHashCode_Found_Null()
        {
            var result = SearchResults<object>.Found(null);
            result.GetHashCode()  ._equals_(0);
        }


        [Test]
        public void Test_GetHashCode_NotFound_Value()
        {
            var result = SearchResults<long>.NotFound();
            result.GetHashCode()  ._equals_(0);
        }


        [Test]
        public void Test_GetHashCode_NotFound_Null()
        {
            var result = SearchResults<object>.NotFound();
            result.GetHashCode()  ._equals_(0);
        }


    }
}
